package de.ipk_gatersleben.bit.bi.edal.publication;

import java.awt.Dimension;
import java.awt.Font;

import javax.swing.JLabel;
import javax.swing.SwingConstants;

/**
 * Class to define the layout of the {@link AttributeLabel}s on the left side of
 * the frame.
 * 
 * @author arendd
 */
public class AttributeLabel extends JLabel {

	private static final long serialVersionUID = 602825678934024556L;

	private static final Dimension LABEL_DIMENSION = new Dimension(40, 20);

	public AttributeLabel(String label, String tooltip) {

		super(label);

		this.setHorizontalAlignment(SwingConstants.LEFT);
		this.setFont(new Font(Font.SANS_SERIF, Font.BOLD,
				PropertyLoader.DEFAULT_FONT_SIZE));
		this.setForeground(PropertyLoader.LABEL_COLOR);
		this.setPreferredSize(LABEL_DIMENSION);
		this.setMinimumSize(LABEL_DIMENSION);
		this.setMaximumSize(LABEL_DIMENSION);
		this.setToolTipText(tooltip);
	}
}
